#!/usr/local/bin/perl -w

eval 'exec /usr/local/bin/perl -w -S $0 ${1+"$@"}'
    if 0; # not running under some shell

eval 'exec /usr/local/bin/perl -w -S $0 ${1+"$@"}'
    if 0; # not running under some shell

eval 'exec /usr/local/bin/perl -w -S $0 ${1+"$@"}'
    if 0; # not running under some shell

use strict;
use FindBin;
use File::Spec::Functions;

my ($command, undef, undef, $rev, @others) = @ARGV;
$command .= '-noadd' if grep { $_ =~ /--no-diff-added/ } @others;

my $file = catfile($FindBin::Bin, updir, 'data', $command, "$rev.txt");

open F, "<$file" or die "Cannot open '$file': $!\n";
binmode F, ':raw';
binmode STDOUT, ':raw';
print for <F>;
close F;
